package com.itheima.zuoye.zy3;

import java.util.ArrayList;
import java.util.HashSet;

public class Test {
    public static void main(String[] args) {
//        10个学生，对10个学生进行去重
//        姓名+年纪
        HashSet<Student> list = new HashSet<>();
        list.add(new Student("张三", 18));
        list.add(new Student("张三", 18));
        list.add(new Student("李四", 18));
        list.add(new Student("王五", 18));
        System.out.println( list);


    }
}
